import { request } from '@/utils/request';
/**
 * @description 获取群组列表分页
 * @returns
 */
export function getGroupPage(data) {
  return request({
    url: '/api/orgm/getGroupPage',
    method: 'post',
    data,
  });
}/**
 * 
 * @param data 获取群组中的人员
 * @returns 
 */
export function getUserByGorupId(data) {
  return request({
    url: '/api/orgm/getUserByGorupId',
    method: 'post',
    data,
  });
}

/**
 * @description 删除群组
 * @returns
 */
export function deleteGroup(data: any) {
  return request(
    {
      url: '/api/orgm/deleteGroup',
      method: 'post',
      data,
    },
    {
      successMsg: '删除成功',
    },
  );
}
/**
 * @description 创建群组
 * @returns
 */
export function createGroup(data) {
  return request({
    url: '/api/orgm/addGroup',
    method: 'post',
    data,
  });
}

// 更新群组
export function editGroup(data) {
  return request({
    url: '/api/orgm/updataGroup',
    method: 'post',
    data,
  });
}
